home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / dxtw106.zip / DXTKEYS.CB < prev    next >
Text File  |  1995-04-10  |  4KB  |  113 lines

  1. /*****************************************************************************/
  2. /*
  3.     DXTKEYS.CB - BRIEF MACRO AUTOLOAD AND KEY ASSIGNMENT FOR
  4.  
  5.         DFTN (TM) DBASE FUNCTION TREE NAVIGATOR
  6.  
  7.     Copyright (C) Juergen Mueller (J.M.) 1992-1995
  8.     All rights reserved.
  9.  
  10.     You are expressly prohibited from selling this software in any form,
  11.     distributing it with another product, or removing this notice.
  12.  
  13.     Limited permission is given to registered DXT users to modify this
  14.     file for their own personal use only. This file may not be used for any
  15.     purpose other than in conjunction with the DXT software package.
  16.  
  17.     THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
  18.     EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE
  19.     IMPLIED WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR
  20.     PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
  21.     PROGRAM AND DOCUMENTATION IS WITH YOU.
  22.  
  23.     written by: Juergen Mueller, Aldingerstrasse 22, D-70806 Kornwestheim,
  24.                 GERMANY
  25.  
  26.     FILE       : DXTKEYS.CB
  27.     REVISION   : 26-Mar-1995
  28.                  12:43:51
  29.  */
  30. /*****************************************************************************/
  31.  
  32. /*****************************************************************************/
  33. /* INITIALIZATION */
  34. /*****************************************************************************/
  35. void _init(void)
  36. {
  37.   /* Perform autoload of the macro file DXT [.CM] for the following macros. */
  38.   /* The macro file must be in the default BRIEF macro directory,           */
  39.   /* otherwise the complete path must be specified here within "autoload()" */
  40.   autoload("dxt", "dft",
  41.                   "dftfind",
  42.                   "dftmenu",
  43.                   "dftbase",
  44.                   "dftfilemenu",
  45.                   "dxtsearchxref",
  46.                   "dftxrefmenu",
  47.                   "dftxrefmenuagain",
  48.                   "dftdefmenu"
  49.           );
  50.  
  51.   /* Assign keys to the available macro functions to simplify working */
  52.   /* if these key combinations are already used, switch to other ones */
  53.  
  54.   /**** DFT functions ****/
  55.   /* SHIFT + <key> */
  56.   assign_to_key("<Shift-F1>",  "dft");
  57.   assign_to_key("<Shift-F2>",  "dftmenu");
  58.   assign_to_key("<Shift-F3>",  "dftxrefmenu");
  59.   assign_to_key("<Shift-F4>",  "dftxrefmenuagain");
  60.   assign_to_key("<Shift-F7>",  "dftdefmenu");
  61.   assign_to_key("<Shift-F8>",  "dftfilemenu");
  62.   assign_to_key("<Shift-F11>", "dftfind");
  63.   assign_to_key("<Shift-F12>", "dftbase");
  64.  
  65.   /* CTRL  + <key> */
  66.   assign_to_key("<Ctrl-Tab>", "dxtsearchxref");
  67. }
  68.  
  69. /*****************************************************************************/
  70. /* HELP-information */
  71. /*****************************************************************************/
  72. void dxthelp(void)
  73. {
  74.   int help_buf, old_buf;
  75.  
  76.   old_buf = inq_buffer();               /* remember actual buffer */
  77.   help_buf = create_buffer("HELP", "HELP");
  78.   set_buffer(help_buf);                 /* make actual buffer */
  79.   attach_buffer(help_buf);              /* attach new buffer to window */
  80.   top_of_buffer();                      /* go to top */
  81.  
  82.   insert("DXT HELP INFORMATION\n\n");
  83.  
  84.   insert("Complete list of all available macro functions with assigned key-combination\n");
  85.   insert("and macro-name. For more informations see the DFT documentation.\n\n");
  86.  
  87.   insert("DFT macro functions\n");
  88.   insert("<Shift-F1>    dft\n");
  89.   insert("<Shift-F2>    dftmenu\n");
  90.   insert("<Shift-F3>    dftxrefmenu\n");
  91.   insert("<Shift-F4>    dftxrefmenuagain\n");
  92.   insert("<Shift-F7>    dftdefmenu\n");
  93.   insert("<Shift-F8>    dftfilemenu\n");
  94.   insert("<Shift-F11>   dftfind\n");
  95.   insert("<Shift-F12>   dftbase\n");
  96.  
  97.   insert("\nAdditional macro function\n");
  98.   insert("<Ctrl-Tab>    dxtsearchxref\n");
  99.   insert("\nThis help screen is invoked by macro 'dxthelp'.\n");
  100.  
  101.   insert("\npress RETURN to continue");
  102.   refresh();                            /* update new screen */
  103.  
  104.   while ((read_char() & 0xff) != 13)    /* wait for RETURN key pressed */
  105.     ;
  106.  
  107.   set_buffer(old_buf);                  /* restore old buffer */
  108.   attach_buffer(old_buf);               /* attach old buffer to window */
  109.   delete_buffer(help_buf);              /* delete buffer from list */
  110. }
  111.  
  112. /**** THIS IS THE END THIS IS THE END THIS IS THE END THIS IS THE END ****/
  113.